﻿
using Microsoft.Extensions.DependencyInjection;
using Odyssey;
using System;


namespace Athena.Performance.Test
{
    using ProxyInterfaces;
    using Transport.BeetleX;
    class Startup : IStartup
    {
        public void Configure(IServiceProvider serviceProvider)
        {
            serviceProvider.UseService();
        }

        public IServiceProvider ConfigureServices(IServiceCollection services)
        {
            services.AddAthenaCore(new ServiceDescriptor()
            {
                Id = "athena.xunit.test",
                Name = "雅典娜RPC-Test"
            });
            services.AddServiceRuntimeCore();
            services.AddRouteCore();
            services.AddFileRouteManager();
            //if (selectId == 1)
            //{
            //    services.AddDotNettyTransport();
            //}
            //else
            //{
            services.AddBeetleXTransport();
            //}
            services.AddSingleton<IUser, User>();
            return services.BuildServiceProvider();
        }
    }
}
